<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DM_SETCURSORSIZE</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DM_SETCURSORSIZE</h1>
<div class=navbar>
<a  href="index_dm.html">Messages</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DM_SETCURSORSIZE</dfn> message is sent to the dialog manager to set the cursor size 
and its visibility flag in edit lines or  <a href="../controls/di_usercontrol.html">DI_USERCONTROL</a> item.
</div>

<h3>Param1</h3>
<div class=descr>
The ID of the dialog item for which you want to retrieve the cursor position.
</div>

<h3>Param2</h3>
<div class=descr>
The high word is the cursor size (from 0 to 100, as used in the 
 <a href="../../winapi/console_cursor_info.html">CONSOLE_CURSOR_INFO</a>) structure),
 the low word is the cursor visibility flag (1 - the cursor is visible, 0 - the cursor is hidden).
</div>

<h3>Return</h3>
<div class=descr>
Previous values:<br>
The high word is the cursor size (from 0 to 100, as used in the 
 <a href="../../winapi/console_cursor_info.html">CONSOLE_CURSOR_INFO</a> structure), the low word is the cursor visibility flag (1 - the cursor is visible, 0 - the cursor is hidden).
</div>

<h3>Controls</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Control</th><th class="cont" width="60%">Description</th></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_combobox.html">DI_COMBOBOX</a></td>
<td class="cont" width="60%">combined list (without <a href="../flags/dif_dropdownlist.html">DIF_DROPDOWNLIST</a> flag)</td></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_edit.html">DI_EDIT</a></td>
<td class="cont" width="60%">edit line</td></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_fixedit.html">DI_FIXEDIT</a></td>
<td class="cont" width="60%">fixed-size input field</td></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_pswedit.html">DI_PSWEDIT</a></td>
<td class="cont" width="60%">password input field</td></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_usercontrol.html">DI_USERCONTROL</a></td>
<td class="cont" width="60%">custom (defined by programmer) control</td></tr>
</table>
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>To show the cursor in a  <a href="../controls/di_usercontrol.html">DI_USERCONTROL</a>
dialog item, it is also necessary to move the cursor to the necessary position:
<pre class=code>
Coord.X=X;
Coord.Y=Y;
Info.SendDlgMessage(hDlg,DM_SETCURSORPOS,3,(LONG_PTR)&amp;Coord);
</pre>

The default cursor position in a
<a href="../controls/di_usercontrol.html">DI_USERCONTROL</a> is
<code>{-1,-1}</code>.</li>

<li>To show a cursor filling the entire character cell under 
Windows 9x/Me set the high word of <dfn>Param2</dfn> to 99.
</ol>

</div>

<h3>Example</h3>
<div class=descr>
<pre class=code>
// set the cursor of 3rd element as fully filled cell
Info.SendDlgMessage(hDlg,DM_SETCURSORSIZE,3,(LONG_PTR)MAKELONG(1,99));
</pre>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a> |
<a href="dm_getcursorsize.html">DM_GETCURSORSIZE</a>|
<a href="dm_getcursorpos.html">DM_GETCURSORPOS</a>|
<a href="dm_setcursorpos.html">DM_SETCURSORPOS</a>|
</div>

</body>
</html>
